#include<iostream>

using namespace std;



string addStrings(string num1, string num2)
{
    string sum;
     int x = 0;
    int i = num1.size() - 1;
    int j = num2.size() - 1;
    while (i >= 0 && j >= 0)
    {
        int counts = (num1[i--] -'0') + (num2[j--] - '0');

        int count = (counts % 10) + x;
        if (count == 10)
        {
            count = 0;
            x = 1;
        }
        else
        {
            x = counts / 10;

        }
        sum += (count + '0');

    }
    while (i >= 0)
    {
        int counts = (num1[i--] - '0' );
        int count = (counts % 10) + x;
        if (count == 10)
        {
            count = 0;
            x = 1;
        }
        else
        {
            x = counts / 10;

        }
        sum += (count + '0');

    }
    while (j >= 0)
    {
        int counts = (num2[j--] - '0' );
        int count = (counts % 10) + x;
        if (count == 10)
        {
            count = 0;
            x = 1;
        }
        else
        {
            x = counts / 10;

        }
        sum += (count + '0');
    }
    if (x > 0)
    {
        sum += (x + '0');
    }


    reverse(sum.begin(),sum.end());
    return sum;




}



int main()
{

    string s1, s2;
    cin >> s1 >> s2;
    string sum=addStrings(s1, s2);
    cout << sum;
    return 0;
}



